#include "sort.h"
#include <iostream>
#include <vector>

int main()
{
    std::vector<int> arr = {5, 3, 8, 4, 2};

    std::cout << "排序前: ";
    for (int num : arr)
    {
        std::cout << num << " ";
    }
    std::cout << std::endl;

    insertionSort(arr);

    std::cout << "插入排序后: ";
    for (int num : arr)
    {
        std::cout << num << " ";
    }
    std::cout << std::endl;

    // 重置数组进行选择排序测试
    arr = {5, 3, 8, 4, 2};
    selectionSort(arr);

    std::cout << "选择排序后: ";
    for (int num : arr)
    {
        std::cout << num << " ";
    }
    std::cout << std::endl;

    return 0;
}